<!DOCTYPE html>
<html>
<head>
<title>客户拜访管理</title>
#parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group">
				<div class="col-sm-3">
					<input type="text" class="form-control" v-model="q.unitName" @keyup.enter="query" placeholder="单位名称">
				</div>

				<div class="col-sm-1 " >拜访形式</div>
				<div class="col-sm-2">
					<select v-model="q.visit_style" class="form-control">
						<option  value=" ">所有</option>
						<option  value="visit_style01">上门拜访</option>
						<option  value="visit_style02">电话拜访</option>
					</select>
				</div>

				<div class="col-sm-1 ">开始时间</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="q.startTime" id="startTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="拜访时间" />
				</div>

				<div class="col-sm-1 ">结束时间</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="q.endTime" id="endTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="拜访时间" />
				</div>

			</div>

			<a class="btn btn-default" @click="query">查询</a>
			<!--#if($shiro.hasPermission("customvisit:save"))-->
			<!--<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>-->
			<!--#end-->
			#if($shiro.hasPermission("customvisit:update"))
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			#end
			#if($shiro.hasPermission("customvisit:delete"))
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			#end
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
			   	<div class="col-sm-1 control-label">企业联系人</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.contactName" placeholder="企业联系人"/>
			    </div>

			   	<div class="col-sm-1 control-label">联系人岗位</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.contactJob" placeholder="联系人岗位"/>
			    </div>
			   	<div class="col-sm-1 control-label">拜访形式</div>
			   	<div class="col-sm-2">
			      <!--<input type="text" class="form-control" v-model="customVisit.visitForm" placeholder="拜访形式"/>-->
					<select v-model="customVisit.visitForm" class="form-control">
						<option v-for="list in visitStyleList" :value="list.value">{{list.label}}</option>
					</select>
			    </div>
			</div>

			<div class="form-group">
			   	<div class="col-sm-1 control-label">拜访地点</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.visitAddress" placeholder="拜访地点"/>
			    </div>

			   	<div class="col-sm-1 control-label">拜访时间</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.visitTime" id="visitTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="拜访时间" readonly="readonly" />
			    </div>

			   	<div class="col-sm-1 control-label">联系方式</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.visitTel" placeholder="联系方式"/>
			    </div>
			</div>

			<div class="form-group">
			   	<div class="col-sm-1 control-label">拜访内容</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.visitContent" placeholder="拜访内容"/>
			    </div>

			   	<div class="col-sm-1 control-label">单位名称</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.unitName" placeholder="单位名称" readonly="readonly" />
			    </div>

			   	<div class="col-sm-1 control-label">单位编码</div>
			   	<div class="col-sm-2">
			      <input type="text" class="form-control" v-model="customVisit.unitId" placeholder="单位编码" readonly="readonly"/>
			    </div>
			</div>

			<div class="form-group">
				<div class="col-sm-1 control-label">备注信息</div>
				<div class="col-sm-2">
					<input type="text" class="form-control" v-model="customVisit.remarks" placeholder="备注信息"/>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${rc.contextPath}/js/custom/customvisit.js?_${date.systemTime}"></script>
</body>
</html>